<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: Card</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: Card</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>Card<span class="signature">(pageContext, opts)</span><span class="type-signature"></span></h2>
        
            <div class="class-description">九宫格翻纸牌组件逻辑部分</div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    
    <h4 class="name" id="Card"><span class="type-signature"></span>new Card<span class="signature">(pageContext, opts)</span><span class="type-signature"></span></h4>
    

    











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>pageContext</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">page路由指针</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">组件所需参数
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>inlineStyle</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">组件所需参数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isBack</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">是否是反面</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isMove</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">是否运动</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>award</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">对应奖项</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">结束回调</td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    
    <dt class="tag-author">Author:</dt>
    <dd class="tag-author">
        <ul>
            <li>pfan</li>
        </ul>
    </dd>
    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="card_card.js.html">card/card.js</a>, <a href="card_card.js.html#line26">line 26</a>
    </li></ul></dd>
    

    

    

    
    <dt class="tag-todo">To Do:</dt>
    <dd class="tag-todo">
        <ul>
            <li>注意：移动端真机，不支持requestAnimationFrame.</li>
        </ul>
    </dd>
    
</dl>

















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>new Card(this,{
   data: [   //宫格信息，内联样式、是否是反面、是否运动、对应奖项
     {isBack: false, isMove: false, award: "一等奖"},    
     {isBack: false, isMove: false, award: "二等奖"},
     {isBack: false, isMove: false, award: "三等奖"},
     {isBack: false, isMove: false, award: "四等奖"},
     {isBack: false, isMove: false, award: "五等奖"},
     {isBack: false, isMove: false, award: "六等奖"},
     {isBack: false, isMove: false, award: "七等奖"},
     {isBack: false, isMove: false, award: "八等奖"},
     {isBack: false, isMove: false, award: "九等奖"}
   ],
   callback: (idx, award) => {
     //结束回调， 参数对应宫格索引，对应奖项    
   }
 })</code></pre>



    
    </div>

    

    

    

    

    

    

    

    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Card.html">Card</a></li><li><a href="FruitMachine.html">FruitMachine</a></li><li><a href="Lock.html">Lock</a></li><li><a href="Machine.html">Machine</a></li><li><a href="Scratch.html">Scratch</a></li><li><a href="Shake.html">Shake</a></li><li><a href="Wheel.html">Wheel</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getDis">getDis</a></li><li><a href="global.html#runAsync">runAsync</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Sep 19 2017 21:36:13 GMT+0800 (HKT)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>